import React, { Suspense } from 'react'


// 懒加载
const Home = React.lazy(() => import('../pages/home'))
const AirPlaneList = React.lazy(() => import('../pages/airplaneList'))
const City = React.lazy(() => import('../pages/city'))
const Detail = React.lazy(() => import('../pages/detail'))
const Login = React.lazy(() => import('../pages/login'))
const Register = React.lazy(() => import('../pages/register'))
const Pay = React.lazy(() => import('../pages/pay'))
const Chat = React.lazy(() => import('../pages/chat'))
const Cal = React.lazy(() => import('../pages/cal'))



const routes = [{
  path: '/',
  element: <><Home></Home></>
},{
  path: '/airplane/list',
  element: <AirPlaneList></AirPlaneList>
},{
  path: '/city',
  element: <City></City>
},{
  path: '/detail',
  element: <Detail></Detail>
},{
  path: '/login',
  element: <Login></Login>
},{
  path: '/register',
  element: <Register></Register>
},{
  path: '/pay',
  element: <Pay></Pay>
},{
  path: '/Chat',
  element: <Chat></Chat>
},{
  path: '/Cal',
  element: <Cal></Cal>
},{
  // 404 
  path: '*',
  element: <div>404, 页面找不到！！！！！</div>
}]

export default routes